﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Model;
using BLL;
using System.Web.Services;

namespace PropertyAppraisal.DoemsKanCha
{
    public partial class AddXunjia : System.Web.UI.Page
    {
        private static InquiryBll bll = new InquiryBll();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 询价添加
        /// </summary>
        /// <returns></returns>
        [WebMethod]
        public static int XunJiaAdd(string xiangid, decimal price, string countent)
        {
            EAInquiry Inquiry = new EAInquiry();
            Inquiry.projectNumber = xiangid;
            Inquiry.inquiry_UnitPrice = price;
            Inquiry.inquiry_Content = countent;
            Inquiry.inquiry_Time = DateTime.Now;
            Inquiry.inquiry_CreateTime = DateTime.Now;
            Inquiry.inquiry_CreatePeople = "小黑";

            var result = bll.InquiryAdd(Inquiry);
            if (result)
            {
                return 1;
            }
            else
                return 0;
        }
    }
}